package com.cntcdt.api.service.impl;

import java.util.List;

import com.cntcdt.api.db.dao.ConsociationCompanyDao;
import com.cntcdt.api.db.model.ConsociationCompanyModel;
import com.cntcdt.api.service.ConsociationCompanyService;

public class ConsociationCompanyServiceImpl implements ConsociationCompanyService {

	@Override
	public int insetModel(ConsociationCompanyModel consociationCompany) {
		return ConsociationCompanyDao.getInstance().insert(consociationCompany);
	}

	@Override
	public List<ConsociationCompanyModel> findBySortTime(long sortTime) {
		return ConsociationCompanyDao.getInstance().findBySortTime(sortTime);
	}

	@Override
	public List<ConsociationCompanyModel> findBySearchContent(String searchContent,long sortTime) {
		return ConsociationCompanyDao.getInstance().findBySearchContent(searchContent,sortTime);
	}

	@Override
	public ConsociationCompanyModel findById(int id) {
		return ConsociationCompanyDao.getInstance().findByPrimaryKey(id);
	}

	@Override
	public boolean updateModel(ConsociationCompanyModel consociationCompany) {
		return ConsociationCompanyDao.getInstance().updateAny(consociationCompany);
	}

	@Override
	public List<ConsociationCompanyModel> findByConsociationId(int consociationId) {
		return ConsociationCompanyDao.getInstance().findByConsociationId(consociationId);
	}

}
